package com.ruoyi.project.im.userip.service.impl;

import com.ruoyi.project.im.userip.domain.UserIpLimits;
import com.ruoyi.project.im.userip.mapper.UserIpLimitsMapper;
import com.ruoyi.project.im.userip.service.UserIpLimitsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserIpLimitsServiceImpl implements UserIpLimitsService {

    @Autowired
    private UserIpLimitsMapper ipLimitsMapper;

    @Override
    public boolean getUserIpLimitByUserId(String userId, String operationId,String ip) {
        return ipLimitsMapper.getUserIpLimitByUserId(userId,operationId,ip)!=null?true:false;
    }

    @Override
    public int insertUserIpLimit(UserIpLimits userIpLimits) {
        return ipLimitsMapper.insertUserIpLimit(userIpLimits);
    }
}
